package sorting;

import java.util.Arrays;

public class ParallelSort {
    public static void main(String args[]) {
        String fruits[] = { "guava", "apple", "banana" };
        String fruits1[] = { "guava", "apple", "banana" };
        // before JDK 1.8, using Arrays.sort()
        // with JDK 1.8, using Arrays.parallelSort()
        
        Arrays.sort(fruits);
        System.out.println(Arrays.toString(fruits));
        Arrays.parallelSort(fruits1);
        System.out.println(Arrays.toString(fruits1));
    }
}
